package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.*;

/**
 * @author Bright Lee
 */
public final class TableDefinition implements SchemaElement, SqlSchemaDefinitionStatement, Statement {

    private int beginIndex;
    private int endIndex;
    private TableScope tableScope;
    private LocalOrSchemaQualifiedName tableName;
    private TableContentsSource tableContentsSource;
    private TableCommitAction tableCommitAction;

    public TableDefinition(int beginIndex,
                           int endIndex,
                           TableScope tableScope,
                           LocalOrSchemaQualifiedName tableName,
                           TableContentsSource tableContentsSource,
                           TableCommitAction tableCommitAction) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.tableScope = tableScope;
        this.tableName = tableName;
        this.tableContentsSource = tableContentsSource;
        this.tableCommitAction = tableCommitAction;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public TableScope getTableScope() {
        return tableScope;
    }

    public LocalOrSchemaQualifiedName getTableName() {
        return tableName;
    }

    public TableContentsSource getTableContentsSource() {
        return tableContentsSource;
    }

    public TableCommitAction getTableCommitAction() {
        return tableCommitAction;
    }

}
